{{- if (hasKey .Values.prometheus.internal.alertmanagers "internal") }}
  {{- range .Values.prometheus.internal.alertmanagers.internal }}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: alertmanager-{{ .name }}
  namespace: d8-monitoring
  {{- include "helm_lib_module_labels" (list $ (dict "app" (printf "alertmanager-%s" .name))) | nindent 2 }}
spec:
  minAvailable: {{ include "helm_lib_is_ha_to_value" (list $ 1 0) }}
  selector:
    matchLabels:
      app.kubernetes.io/name: alertmanager
      alertmanager: {{ .name }}
  {{- end }}
{{- end }}
